Going to a function block or program and setting the instance context

How to go from Instances view to an →instance or a →variable and how to set the →instance context for it:

  1. Establish the connection to the PLC.

  2. If the instance or variable is included within a collapsed level, expand this collapsed level.

  3. Open the context menu for the instance or variable and select Open Instance. Alternative 1: Double-click the instance/variable. Alternative 2: Select the instance/variable and press the Enter-key.
    The result depends on the programming language of the function block or program:

    Programming language

    Result

    →ST

    The ST-viewer is opened for the instance or the variable. You are able to monitor the values of variables in this ST-viewer.
    See "Opening of a larger POU for data debugging takes longer than expected. Scrolling and closing, too." for a restriction when opening the ST-viewer and working in it.

    →FBD or →LD

    The appropriate graphical editor is opened for the instance or the variable. The statusbar of the editor informs about its instance context. If the FBD-editor contains →OLT-fields, you are able to monitor the values of variables in them. Moreover, Boolean lines are animated in the graphical editor.
    (info) Depending on your Neuron Power Engineer configuration, it is possible that this FBD-editor is write-protected as well. So it might not be possible to change the logic in an FBD-editor with instance context.

    Alternative in order to open the editor in which the instance is used: Open the context menu for the instance and select Open Variable Declaration (Instance) or press Shift+Enter.
    Example: If the instance MyFB1 is declared/used within Program1, the command Open Instance for the instance MyFB1 opens the editor for MyFB1, while the command Open Variable Declaration (Instance) opens the editor for Program1.

Good to know

(grey lightbulb) These actions are relevant for a set instance context within the graphical editor:

If you do not need the instance context any longer, just click  in the status bar of the editor. Subsequently, the OLT-fields will not display values any longer. Moreover, the button removes a possible write-protection. Therefore, you will switch to an FBD-editor in which you are able to change the logic.
(info) Afterwards, if you want to return to the FBD-editor with instance context that might be write-protected again, just click  again.

It is possible to quickly go to the declaration of a block.

When going to a declaration from within an FBD-editor, the instance context of the current FBD-editor is automatically transferred to the newly opened editor.

The ST-viewer provides different possibilities to go to a declaration. Depending on the selected possibility, the instance context is transferred to the newly opened editor or an editor without instance context is opened.

(grey lightbulb) If you want to open an editor without the instance context, this is also possible from within the Instances view. Thus, a previous change to the project explorer is obsolete. See "Going to instance or variable (without instance context)".

(grey lightbulb) Usually, an FBD-editor without instance context is used for editing while an FBD-editor with instance context is used for debugging. The default behavior of Neuron Power Engineer is that 2 different tabs can be opened for editing and debugging at the same time.
(info) Depending on your Neuron Power Engineer configuration, it is possible that Neuron Power Engineer opens just one tab for editing or debugging POUs in the FBD-editor. If you are interested in this behavior, ask the system integrator to activate the configuration variable -Dlc3.fbd.autoswitch_edit_diagnostic_view. This possibility helps to avoid any synchronization issues between editing and debugging tabs. But mind that the closing and opening of the tabs might change the tab order.
As a consequence of the configuration variable, instead of opening 2 different tabs for debugging/editing, Neuron Power Engineer automatically closes a tab that might already be opened for the same POU but with the other purpose of editing/debugging. If there are any unsaved changes, you will be able to decide whether to save or discard the changes prior to closing the tab.

(grey lightbulb) The Object Browser view also provides the possibility to open an object without or with an instance context.

(grey lightbulb) The application navigator also provides the possibility to open an object without or with an instance context.